<div class="article">
  <div id="hot_content" class="hot_view clearfix">
    <div class="left_conner"><em></em><b></b></div>

    <% @scroll_items.each_with_index do |item_recommend, index| -%>
      <% item = item_recommend.recommendable %>
      <div class="content clearfix" id="content_menu<%= index + 1 %>">
        <div class="headerline_img">
          <% link_to item do %><%= image_tag item.img, :title => "#{item.name}", :alt => "#{item.name}"%><% end %>
        </div>

        <div class="headerline_content">
          <div class="title clearfix">
            <%= link_to item.name, item, :title => item.name -%>
            <span class="bigstar<%= show_start(item) %>"></span><span class="grade"><%= item.global_rating.to_i %></span>
          </div>
          <span class="pl">品牌:</span><%= item.brand_name %><br/>
          <span class="pl">风格:</span><%= item.style_name %><br/>
          <span class="pl">季节:</span><%= item.season %><br/>
        </div>

        <div class="ul" style=""></div>

        <div class="headerline_review">
          <ul>
            <% item.reviews.limit(3).each do |rating| -%>
              <li>[衣评]<%= link_to truncate(rating.content, :length => 30), item_path(item, :anchor => 'ratings'), :title => rating.content %></a></li>
            <% end -%>
          </ul>
        </div>
      </div>
    <% end -%>

    <ul class="menu" id="hot_view_menu">
      <% @scroll_items.each_with_index do |item_recommend, index| -%>
        <% item = item_recommend.recommendable %>
        <li id="menu<%= index + 1 %>">
          <div class="menu_content clearfix">
            <em></em>
            <div class="arrow"></div>
            <div class="img"><% link_to item do %><%= image_tag item.img(:smaller), :title => "#{item.name}", :alt => "#{item.name}"%><% end %></div>
            <div class="intro"><%= link_to item.name, item, :title => item.name, :class => 'title' -%><span class="allstar<%= show_start(item) %>"></span><%= item.global_rating.to_i %></div>
          </div>
        </li>
      <% end -%>
    </ul>
  </div>

  <!--搜索开始-->
  <div class="search_big">
    <div class="img"></div>
    <form action="/search" method="get" class="search_content">
      <input class="search_text" type="text" name="keyword" id="textfield" />&nbsp;&nbsp;
      <input class="button_red" type="submit" id="button" value="搜索" />
    </form>
    <div class="clear"></div>

    <ul class="content clearfix">
      <li> 热搜:</li>
      <% @hot_search_tags.each do |item_recommend| -%>
        <% tag = item_recommend.recommendable %>
        <li><%= link_to tag.name, search_path(:keyword => tag.name) %></li>
      <% end -%>
      <li><a href="#">更多</a></li>
    </ul>
  </div>

  <!-- -热门商品 -->    
  <div class="hot_Product tabs">
    <div class="conner_greengray_top tab_head">
      <h2 class="green_tab clearfix">
        <div class="ll">热门商品</div>
        <% @recommend_subjects.hot_items.each_with_index do |recommend_subject, index| -%>
          <a rel="tab<%= index %>" href="javascript:void(0)"><span><%= recommend_subject.title %></span></a>
        <% end -%>
      </h2>
    </div>
    <div class="clear"></div>

    <div class="conner_greengray_line tab_content">
      <% @recommend_subjects.hot_items.each_with_index do |recommend_subject, index| -%>
        <ul class="content clearfix tab<%= index %>">
          <% recommend_subject.item_recommends.each do |item_recommend| -%>
            <% item = item_recommend.recommendable %>
            <% if item.is_a?(Item) %>
            <li class="clearfix">
              <div class="img"><% link_to item do %><%= image_tag "#{item.main_pic}_80x80.jpg", :title => "#{item.name}", :alt => "#{item.name}", :height => 96, :width => 96 %><% end %></div>
              <div class="intro">
                <h3><%= link_to item.name, item, :title => item.name -%></h3>
                <div class="star clearfix"><span class="allstar<%= show_start(item) %>"></span><%= item.global_rating.to_i %></div>
                <span class="pl">品牌:</span><%= item.brand_name %><br/>
                <span class="pl">风格:</span><%= item.style_name %><br/>
              </div>
              <div class="clear"></div>
              <div>评论：一个动漫的年代养成了一群执着于动漫的孩。我不知道有多少人爱着动漫，我不知道这其中有多少攒着钱买新出的光盘，数着日子盼着每年新剧场。</div>
            </li>
            <% end %>
          <% end -%>
        </ul>
      <% end -%>
    </div>
    <div class="conner_greengray_bottom"></div>
  </div><!-- -热门商品 -->


  <div class="clear"></div>
  <div class="clearfix"></div>

  <!--评论开始-->
  <div class="comment tabs">
    <div class="conner_greengray_top tab_head">
      <h2 id="comment_tab" class="green_tab clearfix">
        <% @recommend_subjects.ratings.each_with_index do |recommend_subject, index| -%>
          <a rel="tab<%= index %>" class="<%= index == 0 ? 'on' : '' %>" href="javascript:void(0)"><span><%= recommend_subject.title %></span></a>
        <% end -%>
      </h2>
    </div>

    <div class="conner_greengray_line tab_content">
      <% @recommend_subjects.ratings.each_with_index do |recommend_subject, index| -%>
        <div class="tab<%= index %>">
          <% recommend_subject.item_recommends.each do |item_recommend| -%>
            <% review = item_recommend.recommendable %>
            <% if review %>
            <div class="ctsh">
              <ul class="tlst clearfix" style="clear: both;">
                <li class="nlst">
                  <h3>
                    <%= link_to review.item_name, item_path(review.item_id), :class => "ll" %>
                    <div id="tb-3470215" class="rr">
                      <a id="af-3470215" rel="sw-False" href="#" class="j a_unfolder" style="background: none repeat scroll 0% 0% transparent;"><img src="/images/arrow2.gif" alt="&gt;" title="展开全文"></a>
                      <a id="au-3470215" href="javascript:void(0);" class="j a_folder" style="background: none repeat scroll 0% 0% transparent; display: none;"><img src="/images/arrow3.gif" alt="&lt;" title="缩进全文"></a>
                    </div>
                  </h3>
                </li>
                <li class="ilst" style="clear: both;">
                  <% link_to user_path(review.user) do %><img class="pil" src="/images/icon/user_<%= cycle(1, 2)%>.jpg" alt="头像"><% end %><br/>
                  <%= link_to review.user.try(:user_name), user_path(review.user) %><br/>
                  <!--等级-->
                </li>
                <li class="clst">
                  <div class="pl ll obss">
                    <span class="starb">评分</span>
                    <span class="stars<%= review.rating.try(:global_rating).to_i %> stars" title="推荐"></span>
                  </div>
                  <br/><br/>

                  <div id="review_short">
                    <%= review.content %>
                  </div>
                  <br/><br/>

                  <div class="pl clearfix">
                    <span class="fleft"><a href="#"><%= time_ago_in_words review.created_at %> 前<!--&nbsp; ｜&nbsp; 35人回应--></a></span>
                    <!--
                    <div class="rr">
                      <a href="#" class="report_1">23<span></span>有用</a> |
                      <a href="#" class="report_2">45<span></span>没用</a> |
                      <a href="#" class="report_3">&nbsp;<span></span> 举报</a>
                    </div>-->
                  </div>
                </li>
              </ul>
            </div>
            <% end %>
          <% end -%>
          <div class="clear"></div>
          <p class="pl" align="right" style="padding-right:20px;">&gt; <%= link_to '更多评论', recommend_subject_path(recommend_subject) %></p>
        </div>
      <% end -%>
    </div>
    <div class="conner_greengray_bottom"></div>
  </div>
  <!--评论结束-->
</div>

<!--右侧栏目开始-->
<div class="aside">
  <!--广告开始 -->
  <div class="ads_top_right"><img src="/images/icon/ads_top.jpg" width="310" height="188" alt="广告图片" /></div>
  <!--广告结束-->

  <h2 class="grayh2">热门标签</h2>
  <div class="conner_gray_top"></div>
  <div class="hot_tags">
    <% @recommend_subjects.hot_tags.each do |recommend_subject| -%>
      <ul class="content clearfix <%= @recommend_subjects.hot_tags.last == recommend_subject ? 'last' : '' %>">
        <li class="font_cyan">[<%= recommend_subject.title %>]</li>
        <% recommend_subject.item_recommends.each do |item_recommend| -%>
          <li><%= link_to item_recommend.name, tag_path(:name => item_recommend.name) %></li>
        <% end -%>
        <li><%= link_to '(更多)', recommend_subject %></li>
      </ul>
    <% end -%>
  </div>
  <div class="conner_gray_bottom"></div>

  <h2  class="grayh2">本周人气榜</h2>
  <div class="tabs" style="border:1px solid #fff;">
    <ul class="content tab_tag">
      <% @recommend_subjects.top_week_items.each_with_index do |recommend_subject, index| -%>
        <li style="cursor: pointer" rel="tab<%= index %>"><span><%= recommend_subject.title %></span></li>
      <% end -%>
    </ul>
  </div>
  <div class="clear"></div>

  <div class="conner_green_top"></div>
  <div class="week_top tab_content">
    <% @recommend_subjects.top_week_items.each_with_index do |recommend_subject, i| -%>
      <ul class="content tab<%= i %>">
        <% recommend_subject.item_recommends.each_with_index do |item_recommend, index| -%>
          <% item = item_recommend.recommendable %>
          <% if item %>
          <li class="clearfix">
            <div class="top_number number<%= index > 2 ? '' : index + 1 %>"><%= index + 1 %></div>
            <div class="adimg"><img src="/images/icon/top_select_img.png" width="54" height="43" alt=" " /></div>
            <div class="name"><%= link_to truncate(item.name, :length => 23), item %></div>
            <div class="price"><%= link_to 'Hitao价: 2.20元', item %></div>
          </li>
          <% end %>
        <% end -%>
      </ul>
    <% end -%>
  </div>
  <div class="conner_green_bottom"></div>

  <!--推荐开始-->
  <h2 class="grayh2 clearfix">
    <span class="ll">兜兜推荐</span> <span class="rr font12"><%= link_to '更多', recommend_subject_path(@site_recommend), :class => 'link_01' %></span>
  </h2> 
  <div class="clear"></div>
  <div class="conner_green_top"></div>
  <div class="photo_show">
    <div class="content clearfix">
      <ul>
        <% @site_recommend.item_recommends.limit(9).each do |item_recommend| -%>
          <% item = item_recommend.recommendable %>
          <li>
            <% link_to item do %><%= image_tag "#{item.main_pic}_80x80.jpg", :title => "#{item.name}", :alt => "#{item.name}"%><% end %><br/>
            <%= link_to truncate(item.name, :length => 14), item, :title => item.name %>
          </li>
        <% end rescue nil -%>
      </ul>
    </div>
    <div class="conner_green"><span class="bottom_left">&nbsp;</span><span class="bottom_right">&nbsp;</span></div>
  </div>
  <div class="conner_green_bottom"></div>
</div>
<!-- 右侧栏目结束 -->
